3.669 \(\int (a+i a \tan (e+f x)) (A+B \tan (e+f x)) (c-i c \tan (e+f x)) \, dx\)

Optimal. Leaf size=32 \[ \frac{a A c \tan (e+f x)}{f}+\frac{a B c \tan ^2(e+f x)}{2 f} \]

[Out]

(a*A*c*Tan[e + f*x])/f + (a*B*c*Tan[e + f*x]^2)/(2*f)

________________________________________________________________________________________

Rubi [A]  time = 0.0398157, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 37, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.027, Rules used = {3588} \[ \frac{a A c \tan (e+f x)}{f}+\frac{a B c \tan ^2(e+f x)}{2 f} \]

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[e + f*x])*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x]),x]

[Out]

(a*A*c*Tan[e + f*x])/f + (a*B*c*Tan[e + f*x]^2)/(2*f)

Rule 3588

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(a*c)/f, Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x
], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0]

Rubi steps

\begin{align*} \int (a+i a \tan (e+f x)) (A+B \tan (e+f x)) (c-i c \tan (e+f x)) \, dx &=\frac{(a c) \operatorname{Subst}(\int (A+B x) \, dx,x,\tan (e+f x))}{f}\\ &=\frac{a A c \tan (e+f x)}{f}+\frac{a B c \tan ^2(e+f x)}{2 f}\\ \end{align*}

Mathematica [A]  time = 0.0414586, size = 32, normalized size = 1. \[ \frac{a A c \tan (e+f x)}{f}+\frac{a B c \sec ^2(e+f x)}{2 f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[e + f*x])*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x]),x]

[Out]

(a*B*c*Sec[e + f*x]^2)/(2*f) + (a*A*c*Tan[e + f*x])/f

________________________________________________________________________________________

Maple [A]  time = 0.011, size = 27, normalized size = 0.8 \begin{align*}{\frac{ac}{f} \left ({\frac{B \left ( \tan \left ( fx+e \right ) \right ) ^{2}}{2}}+A\tan \left ( fx+e \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(f*x+e))*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e)),x)

[Out]

1/f*a*c*(1/2*B*tan(f*x+e)^2+A*tan(f*x+e))

________________________________________________________________________________________

Maxima [A]  time = 1.74679, size = 39, normalized size = 1.22 \begin{align*} \frac{B a c \tan \left (f x + e\right )^{2} + 2 \, A a c \tan \left (f x + e\right )}{2 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e)),x, algorithm="maxima")

[Out]

1/2*(B*a*c*tan(f*x + e)^2 + 2*A*a*c*tan(f*x + e))/f

________________________________________________________________________________________

Fricas [C]  time = 1.31214, size = 144, normalized size = 4.5 \begin{align*} \frac{{\left (2 i \, A + 2 \, B\right )} a c e^{\left (2 i \, f x + 2 i \, e\right )} + 2 i \, A a c}{f e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e)),x, algorithm="fricas")

[Out]

((2*I*A + 2*B)*a*c*e^(2*I*f*x + 2*I*e) + 2*I*A*a*c)/(f*e^(4*I*f*x + 4*I*e) + 2*f*e^(2*I*f*x + 2*I*e) + f)

________________________________________________________________________________________

Sympy [C]  time = 2.80183, size = 82, normalized size = 2.56 \begin{align*} \frac{\frac{2 i A a c e^{- 4 i e}}{f} + \frac{\left (2 i A a c + 2 B a c\right ) e^{- 2 i e} e^{2 i f x}}{f}}{e^{4 i f x} + 2 e^{- 2 i e} e^{2 i f x} + e^{- 4 i e}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e)),x)

[Out]

(2*I*A*a*c*exp(-4*I*e)/f + (2*I*A*a*c + 2*B*a*c)*exp(-2*I*e)*exp(2*I*f*x)/f)/(exp(4*I*f*x) + 2*exp(-2*I*e)*exp
(2*I*f*x) + exp(-4*I*e))

________________________________________________________________________________________

Giac [B]  time = 1.42013, size = 153, normalized size = 4.78 \begin{align*} \frac{B a c \tan \left (f x\right )^{2} \tan \left (e\right )^{2} - 2 \, A a c \tan \left (f x\right )^{2} \tan \left (e\right ) - 2 \, A a c \tan \left (f x\right ) \tan \left (e\right )^{2} + B a c \tan \left (f x\right )^{2} + B a c \tan \left (e\right )^{2} + 2 \, A a c \tan \left (f x\right ) + 2 \, A a c \tan \left (e\right ) + B a c}{2 \,{\left (f \tan \left (f x\right )^{2} \tan \left (e\right )^{2} - 2 \, f \tan \left (f x\right ) \tan \left (e\right ) + f\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e)),x, algorithm="giac")

[Out]

1/2*(B*a*c*tan(f*x)^2*tan(e)^2 - 2*A*a*c*tan(f*x)^2*tan(e) - 2*A*a*c*tan(f*x)*tan(e)^2 + B*a*c*tan(f*x)^2 + B*
a*c*tan(e)^2 + 2*A*a*c*tan(f*x) + 2*A*a*c*tan(e) + B*a*c)/(f*tan(f*x)^2*tan(e)^2 - 2*f*tan(f*x)*tan(e) + f)